<!-- 发放心电设备 -->
<template>
	<el-dialog title="发放心电设备" :visible.sync="detailVisible" width="600" :before-close="handleClose">
		<avue-form :option="option" v-model="form" @submit="submit" @reset-change="resetChange"></avue-form>
		<span slot="footer" class="avue-dialog__footer">
			<el-button type="primary" size="small" @click="save" icon="el-icon-circle-plus-outline">确 定</el-button>
			<el-button size="small" @click="detailVisible = false" icon="el-icon-circle-close">关 闭</el-button>
		</span>
	</el-dialog>
</template>

<script>
	export default {
		data() {
			return {
				detailVisible: false,
				form: {}
			};
		},
		computed: {
			option() {
				return {
					submitBtn: false,
					emptyBtn: false,
					span: 20,
					column: [{
							label: '病人',
							prop: 'driverPermitCity',
							type: 'select'
						},
						{
							label: '心电设备',
							prop: 'bussId'
						}
					]
				};
			}
		},
		methods: {
			handleOpen() {
				this.detailVisible = true;
			},
			handleClose() {
				this.detailVisible = false;
			},
			submit(form, done) {
				let {
					enterpriseId,
					$enterpriseId,
					bussId,
					driverPermitCity,
					id,
					pic1,
					pic2
				} = this.form;
				let params = {
					enterprise_id: enterpriseId,
					description: $enterpriseId,
					bussId,
					city: driverPermitCity,
					id,
					pic1,
					pic2
				};
				pass(params).then(res => {
					if (res.success) {
						this.$modal.msgSuccess('操作成功');
						this.handleClose();
						this.$emit('ok');
					}
				});
				done();
			},
			resetChange() {

			}
		}
	};
</script>

<style></style>